
package com.gitee.jmash.oidc.web;

import com.gitee.jmash.mvc.JmashApplication;
import jakarta.enterprise.context.ApplicationScoped;
import jakarta.mvc.security.Csrf;
import jakarta.mvc.security.Csrf.CsrfOptions;
import jakarta.ws.rs.ApplicationPath;
import jakarta.ws.rs.core.Application;
import java.util.Map;
import org.eclipse.microprofile.openapi.annotations.OpenAPIDefinition;
import org.eclipse.microprofile.openapi.annotations.info.Contact;
import org.eclipse.microprofile.openapi.annotations.info.Info;
import org.eclipse.microprofile.openapi.annotations.info.License;

/**
 * Default JAX-RS application listening on /oauth2.
 */
@ApplicationPath("/oauth")
@ApplicationScoped
@OpenAPIDefinition(info = @Info(title = "OpenId Connect Standard Impl", version = "1.0", description = "Jmash OIDC is A OpenId Connect Standard Impl.", license = @License(name = "Apache 2.0", url = "http://www.apache.org/licenses/LICENSE-2.0.html"), contact = @Contact(name = "CGD", url = "https://gitee.com/jmash/oidc", email = "52398508@qq.com")))
public class App extends Application {

  @Override
  public Map<String, Object> getProperties() {
    return Map.of(Csrf.CSRF_PROTECTION, CsrfOptions.IMPLICIT);
  }

  public static void main(String[] args) {
    JmashApplication.run(App.class, args);
  }

}
